package Dialogo;

import java.awt.FlowLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;

public class Dialogo {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		JFrame t= new JFrame();
		t.setName("TextField");
		t.setSize(200, 150);
		t.setVisible(true);
		
		JOptionPane.showMessageDialog(t, "Dialogo");
		
		Object[] opciones = {"Aceptar","Cancelar"};
		int i = JOptionPane.showOptionDialog(t, "Option dialog", "Opciones", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,null,opciones,opciones[0]);
		i=JOptionPane.showConfirmDialog(t, "Confirm Dialog");
		String s = JOptionPane.showInputDialog(t, "Input Dialog");

		JLabel l = new JLabel();
		l.setText(s);
		l.setVisible(true);
		
		t.getContentPane().setLayout(new FlowLayout());
		t.getContentPane().add(l);
		
	}
}
